﻿<UserControl x:Class="BetterExplorer.BreadcrumbBarItem"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             xmlns:Ribbon="clr-namespace:Fluent;assembly=Fluent"
             mc:Ignorable="d" Height="22" MouseEnter="UserControl_MouseEnter" MouseLeave="UserControl_MouseLeave">
    <UserControl.Resources>
        <ControlTemplate x:Key="ButtonTemplate" TargetType="Button">
            <Image/>
        </ControlTemplate>
        <Style TargetType="{x:Type Button}">
            <Setter Property="Background" Value="#01000000"/>
            <Setter Property="BorderThickness" Value="0"/>
            <Setter Property="BorderBrush" Value="{x:Null}"/>
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="{x:Type Button}">
                        <Grid>
                            <Grid x:Name="Chrome" Background="{TemplateBinding Background}" SnapsToDevicePixels="true">
                                <ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" RecognizesAccessKey="True" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
                            </Grid>
                            
                        </Grid>
                        <ControlTemplate.Triggers>
                            <Trigger Property="IsEnabled" Value="false">
                                <Setter Property="Foreground" Value="#ADADAD"/>
                                <Setter Property="Opacity" TargetName="Chrome" Value="0.5"/>
                            </Trigger>
                        </ControlTemplate.Triggers>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
            <Style.Triggers>
                <Trigger Property="IsMouseOver" Value="True">
                    <Setter Property="Background" Value="#013C7FB1">

                    </Setter>
                </Trigger>
            </Style.Triggers>
        </Style>
    </UserControl.Resources>
    <Grid x:Name="Base">
        <Border BorderBrush="#013C7FB1" BorderThickness="1" Name="PathBorder" Margin="0,0,14,0">
            <Grid>
                <Grid Name="SelectionBackground" Visibility="Hidden">
                    <Grid.Background>
                        <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                            <GradientStop Color="#FFEAF6FD" Offset="0" />
                            <GradientStop Color="#FFA6D9F4" Offset="1" />
                        </LinearGradientBrush>
                    </Grid.Background>
                </Grid>
                <Grid MouseUp="Grid_MouseUp" MouseDown="Grid_MouseDown" PreviewMouseDown="Grid_PreviewMouseDown">
                    <Image Height="16" HorizontalAlignment="Left" Margin="2,0,0,0" Name="PathImage" Stretch="Fill" VerticalAlignment="Center" Width="16" />
                    <TextBlock HorizontalAlignment="Stretch" Margin="19,0,3,0" Name="pathName" Text="Your path here" VerticalAlignment="Center" />
                </Grid>
            </Grid>
        </Border>
        <Border BorderThickness="1" BorderBrush="#013C7FB1" Name="MenuBorder" Width="15" HorizontalAlignment="Right">
            <Grid Name="grid1">
                <Grid Name="MenuBackground" Visibility="Hidden">
                    <Grid.Background>
                        <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                            <GradientStop Color="#FFEAF6FD" Offset="0" />
                            <GradientStop Color="#FFA6D9F4" Offset="1" />
                        </LinearGradientBrush>
                    </Grid.Background>
                </Grid>
                <Button x:Name="btnDropDown" Click="Button_Click" HorizontalContentAlignment="Stretch" VerticalContentAlignment="Stretch" Padding="0" MouseDown="btnDropDown_MouseDown" MouseUp="btnDropDown_MouseUp">
                    <Grid>
                        <Path x:Name="expandArrow" Data="M 5 7 L 8 10 L 5 13 Z" Visibility="Visible"
          StrokeThickness="1" 
          StrokeLineJoin="Miter" 
          Stroke="Black" 
          Fill="Black" />
                        <Path x:Name="ddArrow" Data="M 4 9 L 6 12 L 8 9 Z" Visibility="Hidden"
          StrokeThickness="1" 
          StrokeLineJoin="Miter" 
          Stroke="Black" 
          Fill="Black" />
                    </Grid>
                </Button>
            </Grid>
        </Border>
    </Grid>
</UserControl>
